package com.example.activity.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * sys_deploy_info.deploy_status
 */
@AllArgsConstructor
@Getter
public enum DeployStatusEnum {

    UPLOAD(0, "流程已上传"),
    DEPLOY(1, "流程已部署"),
    RUNNING(2, "流程实例运行中"),
    DELETE(3, "流程已删除"),

    ;

    private final Integer code;

    private final String cn;

    /**
     * 校验流程是否运行
     *
     * @param code 状态值
     * @return true 流程已部署，运行中
     */
    public static boolean checkActRunning(Integer code) {
        return RUNNING.getCode().equals(code);
    }
}
